package fw.helpers;

import static fw.Config.PROXY_1;
import static fw.Config.PROXY_2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import fw.ApplicationManager;

public class ProxyHelper {
	private final ApplicationManager app;
	private static Logger LOG = LoggerFactory.getLogger(ProxyHelper.class);

	public ProxyHelper(ApplicationManager p_app) {
		app = p_app;
	}

	/**
	 * Get proxy (address:port)
	 * 
	 * @param p_location
	 * @return r_proxy
	 */
	public String getProxy(String p_location) {
		String r_proxy = null;

		if ("loc1".equals(p_location)) {
			r_proxy = PROXY_1;
		} else if ("loc2".equals(p_location)) {
			r_proxy = PROXY_2;
		} else {
			LOG.info("proxy: def");
		}

		return r_proxy;
	}
}